<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>03数据类型</title>
</head>
<body>

<script >
    //Js
    //原始类型 string number boolean undefined null
    //引用类型 Object Number Boolean Function Array

    //声明变量不赋值 会被定义为undefined
    var g;
    console.log(g,typeof g)

    //1定义JS对象
    let obj = {
        name :'张三',
        age :18
    };
    console.log(obj);
    console.log(obj.name);
    console.log(obj.age);

    obj.age=19;

    obj.like = '吃冰棍';
    console.log(obj);
    console.log(obj.like);

    //如果该属性没有赋值,还是undefined =>
    //访问对象不存在会得到undefined
    console.log(obj.play)

    //JS数组
    let arr=['亚索','永恩','阿里',1,6.6,true];
    console.log(arr,typeof  arr);
    console.log(arr[0]);
    console.log(arr[99]);
</script>
</body>
</html>